﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

namespace UnitTesting
{
    [TestFixture]
    public class GContactsProviderTester
    {
        [Test]
        public void GetAllContacts_Test()
        {
            GSyncFactoryGContactsProviderTesterTest.OverrideInstanceType();

            GSync.IDataProvider storage = GSync.GSyncFactory.Instance.GetRemoteContactStorage();

            IEnumerable<GSync.InternalEntry> list = storage.AllRecords;

        }

        public class GSyncFactoryGContactsProviderTesterTest : GSync.GSyncFactory
        {
            public static void OverrideInstanceType()
            {
                _Instance = new GSyncFactoryGContactsProviderTesterTest();
            }

            public override GSync.ISettingsManager SettingsManager
            {
                get
                {
                    return  new GSync.SettingsManagerStub();
                }
            }
        }
    }
}
